From: Richard M. Stallman Date: Wed, 10 Jan 2007 01:15:07 +0000 (+0000) Subject: (momentary-string-display): Use save-excursion. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~2901 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=685e3d826cb083dc8d9c418b9db5f93f149a5029;p=emacs.git (momentary-string-display): Use save-excursion. --- diff --git a/lisp/subr.el b/lisp/subr.el index c5c12137e55..e7e9867b13e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1905,11 +1905,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." (recenter (/ (window-height) 2))) ;; If that pushed message start off the screen, ;; scroll to start it at the top of the screen. - (move-to-window-line 0) - (if (> (point) pos) - (progn + (save-excursion + (move-to-window-line 0) + (if (> (point) pos) (goto-char pos) - (recenter 0))) + (recenter 0))) (message (or message "Type %s to continue editing.") (single-key-description exit-char)) (let (char)